<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title>Flutter组件dismissible | 早起的年轻人</title>
    <meta property="og:title" content="Flutter组件dismissible - 早起的年轻人">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content='2021-08-17T13:06:29&#43;08:00'>
        
        
    <meta property="article:modified_time" content='2021-08-17T13:06:29&#43;08:00'>
        
    <meta name="Keywords" content="Flutter，golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="Flutter组件dismissible">
        
    <meta name="author" content="luckly">
    <meta property="og:url" content="https://luckly.work/post/Flutter/flutter%E7%BB%84%E4%BB%B6dismissible/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://luckly.work/">
                        早起的年轻人
                    </a>
                
                <p class="description">专注于Flutter、Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://luckly.work/">首页</a>
                    
                    <a  href="https://luckly.work/categories/" title="分类">分类</a>
                    
                    <a  href="https://luckly.work/tags/" title="标签">标签</a>
                    
                    <a  href="https://luckly.work/about/" title="关于我">关于我</a>
                    
                    <a  href="https://github.com/ITmxs/" title="github">github</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents">
  <ul>
    <li><a href="#提供滞留提示">提供“滞留”提示</a>
      <ul>
        <li></li>
      </ul>
    </li>
  </ul>
</nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title">Flutter组件dismissible</h1>
        </header>
        <date class="post-meta meta-date">
            2021年8月17日
        </date>
        
        <div class="post-meta">
            <span>|</span>
            
            <span class="meta-category"><a href='/categories/flutter'>flutter</a></span>
            
        </div>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="post-content">
            <p>今天来看一个和滑动相关的组件：<code>Dismissible</code> 。该组件可以通过滑动来使条目移除。先来看一下它最简单的使用。</p>
<p>指定注意的是：<code>Dismissible</code> 组件滑动移除只是 UI 的效果，实际的数据并未被移除。为了保证<code>数据</code>与 <code>UI</code> 的一致性，我们<code>一般</code>在移除后，会同时移除对应的数据，并进行重建，</p>
<h2 id="提供滞留提示">提供“滞留”提示</h2>
<p>顾名思义，我们的应用允许用户将列表项滑出列表，但是应用可能没有向用户给出视觉提示，告诉他们操作时发生了什么。要给出提示，表明我们正在删除列表项，就需要在他们将列表项滑出屏幕的时候，展示一个“滞留”提示。这个例子中，我们使用了一个红色背景。</p>
<p>出于这个目的，我们为 <code>Dismissible</code> 设置了一个 <code>background</code> 参数。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/foundation.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/material.dart&#39;</span>;

<span style="color:#66d9ef">void</span> main() {
  runApp(<span style="color:#66d9ef">const</span> MyApp());
}

<span style="color:#75715e">// MyApp is a StatefulWidget. This allows updating the state of the
</span><span style="color:#75715e">// widget when an item is removed.
</span><span style="color:#75715e"></span>
<span style="color:#75715e">// MyApp是一个StatefulWidget。这样，我们就能够在列表项被移除的时候，更新Widget的状态。
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MyApp</span> <span style="color:#66d9ef">extends</span> StatefulWidget {
  <span style="color:#66d9ef">const</span> MyApp({Key<span style="color:#f92672">?</span> key}) <span style="color:#f92672">:</span> <span style="color:#66d9ef">super</span>(key: key);

  <span style="color:#960050;background-color:#1e0010">@</span>override
  MyAppState createState() {
    <span style="color:#66d9ef">return</span> MyAppState();
  }
}

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MyAppState</span> <span style="color:#66d9ef">extends</span> State<span style="color:#f92672">&lt;</span>MyApp<span style="color:#f92672">&gt;</span> {
  <span style="color:#66d9ef">final</span> items <span style="color:#f92672">=</span> List<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;</span>.generate(<span style="color:#ae81ff">20</span>, (i) <span style="color:#f92672">=&gt;</span> <span style="color:#e6db74">&#39;Item </span><span style="color:#e6db74">${</span>i <span style="color:#f92672">+</span> <span style="color:#ae81ff">1</span><span style="color:#e6db74">}</span><span style="color:#e6db74">&#39;</span>);

  <span style="color:#960050;background-color:#1e0010">@</span>override
  Widget build(BuildContext context) {
    <span style="color:#66d9ef">const</span> title <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;Dismissing Items&#39;</span>;

    <span style="color:#66d9ef">return</span> MaterialApp(
      title: title,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: <span style="color:#66d9ef">const</span> Text(title),
        ),
        body: ListView.builder(
          itemCount: items.length,
          itemBuilder: (context, index) {
            <span style="color:#66d9ef">final</span> item <span style="color:#f92672">=</span> items[index];
            <span style="color:#66d9ef">return</span> Dismissible(
              <span style="color:#75715e">// Each Dismissible must contain a Key. Keys allow Flutter to
</span><span style="color:#75715e"></span>              <span style="color:#75715e">// uniquely identify widgets.
</span><span style="color:#75715e"></span>              <span style="color:#75715e">// 每个Dismissible实例都必须包含一个Key。Key让Flutter能够对Widgets做唯一标识。
</span><span style="color:#75715e"></span>              key: Key(item),
              <span style="color:#75715e">// Provide a function that tells the app
</span><span style="color:#75715e"></span>              <span style="color:#75715e">// what to do after an item has been swiped away.
</span><span style="color:#75715e"></span>              <span style="color:#75715e">// 我们还需要提供一个函数，告诉应用，在项目被移出后，要做什么。
</span><span style="color:#75715e"></span>              onDismissed: (direction) {
                <span style="color:#75715e">// Remove the item from the data source.
</span><span style="color:#75715e"></span>                <span style="color:#75715e">// 从数据源中移除项目
</span><span style="color:#75715e"></span>                setState(() {
                  items.removeAt(index);
                });

                <span style="color:#75715e">// Then show a snackbar.
</span><span style="color:#75715e"></span>                ScaffoldMessenger.of(context)
                    .showSnackBar(SnackBar(content: Text(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>item<span style="color:#e6db74"> dismissed&#39;</span>)));
              },
              <span style="color:#75715e">// Show a red background as the item is swiped away.
</span><span style="color:#75715e"></span>              <span style="color:#75715e">// 列表项被滑出时，显示一个红色背景(Show a red background as the item is swiped away)
</span><span style="color:#75715e"></span>              background: Container(color: Colors.red),
              child: ListTile(
                title: Text(item),
              ),
            );
          },
        ),
      ),
    );
  }
}
</code></pre></div><h5 id="1-background-和-secondarybackground">1、 background 和 secondaryBackground</h5>
<p><code>Dismissible</code> 组件滑动时，我们可以指定背景组件。如果只设置 <code>background</code> ，那么左滑和右滑背景都是一样的，如下左图绿色背景。如果设置 <code>background</code> 和 <code>secondaryBackground</code> ，则左滑背景为 <code>background</code> ，右滑背景为 <code>secondaryBackground</code> ，如下右图</p>
<p>代码实现也 很简单，指定 <code>background</code> 和 <code>secondaryBackground</code> 对于组件即可。如下 <code>tag1</code> 和 <code>tag2</code> 处理。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">Widget _buildItems(BuildContext context, <span style="color:#66d9ef">int</span> index) {
  <span style="color:#66d9ef">return</span> Dismissible(
    key: ValueKey(data[index]),
    background: buildBackground(), <span style="color:#75715e">// tag1
</span><span style="color:#75715e"></span>    secondaryBackground: buildSecondaryBackground(), <span style="color:#75715e">// tag2
</span><span style="color:#75715e"></span>    child: ItemBox(
      info: data[index],
    ),
    onDismissed: (direction) <span style="color:#f92672">=&gt;</span>_onDismissed(direction,index),
  );
}

Widget buildBackground(){
  <span style="color:#66d9ef">return</span> Container(
    color: Colors.green,
    alignment: Alignment(<span style="color:#f92672">-</span><span style="color:#ae81ff">0.9</span>, <span style="color:#ae81ff">0</span>),
    child: Icon(
      Icons.check,
      color: Colors.white,
    ),
  );
}

Widget buildSecondaryBackground(){
  <span style="color:#66d9ef">return</span> Container(
    alignment: Alignment(<span style="color:#ae81ff">0.9</span>, <span style="color:#ae81ff">0</span>),
    child: Icon(
      Icons.close,
      color: Colors.white,
    ),
    color: Colors.red,
  );
}
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><hr>
<h5 id="2-confirmdismiss-回调">2. confirmDismiss 回调</h5>
<p>从源码中可以看出 <code>confirmDismiss</code> 的类型为 <code>ConfirmDismissCallback</code> 。它是一个函数类型，可以回调出 <code>DismissDirection</code> 对象，返回 <code>bool</code> 值。可以看出这个回调是一个<code>异步方法</code>，所以我们可以处理一下异步事件。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#f92672">----&gt;</span>[Dismissible<span style="color:#960050;background-color:#1e0010">#</span>confirmDismiss <span style="color:#960050;background-color:#1e0010">声明</span>]<span style="color:#f92672">----</span>
<span style="color:#66d9ef">final</span> ConfirmDismissCallback<span style="color:#f92672">?</span> confirmDismiss;

<span style="color:#66d9ef">typedef</span> ConfirmDismissCallback <span style="color:#f92672">=</span> Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">bool</span><span style="color:#f92672">?&gt;</span> Function(DismissDirection direction);
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><p>如下左图中，滑动结束后，<code>等待两秒</code>再执行后续逻辑。效果上来看条目会在两秒后移除。也就说明 <code>onDismissed</code> 是在 <code>confirmDismiss</code> 异步方法完成后才被调用的。</p>
<p>该回调有一个 <code>Future&lt;bool?&gt;</code> 类型的返回值，返回 <code>false</code> 则表示不移除条目。如下右图中，绿色背景下<code>不会</code>移除条目，红色背景下<code>会</code>移除条目。就可以通过该返回值进行控制。</p>
<p>代码实现如下, <code>tag1</code> 处设置 <code>confirmDismiss</code> 属性。返回值是看 <code>direction</code> 是否不是 <code>startToEnd</code>，即 <code>从左向右滑动</code> 。也就是说， <code>从左向右滑动</code> 时，会返回 <code>false</code> ，即不消除条目。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">Widget _buildItems(BuildContext context, <span style="color:#66d9ef">int</span> index) {
  <span style="color:#66d9ef">return</span> Dismissible(
    key: ValueKey(data[index]),
    background: buildBackground(),
    secondaryBackground: buildSecondaryBackground(),
    child: ItemBox(
      info: data[index],
    ),
    onDismissed: (direction) <span style="color:#f92672">=&gt;</span>_onDismissed(direction,index),
    confirmDismiss: _confirmDismiss, <span style="color:#75715e">// tag1
</span><span style="color:#75715e"></span>  );
}

Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">bool</span><span style="color:#f92672">?&gt;</span> _confirmDismiss(DismissDirection direction) <span style="color:#66d9ef">async</span>{
  <span style="color:#66d9ef">await</span> Future.delayed(Duration(seconds: <span style="color:#ae81ff">2</span>));
  print(<span style="color:#e6db74">&#39;_confirmDismiss:</span><span style="color:#e6db74">$</span>direction<span style="color:#e6db74">&#39;</span>);
  <span style="color:#66d9ef">return</span> direction<span style="color:#f92672">!=</span>DismissDirection.startToEnd;
}
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><hr>
<h5 id="3-direction-滑动方向">3. direction 滑动方向</h5>
<p><code>direction</code> 表示滑动的方向，类型是 <code>DismissDirection</code> 是枚举，有 <code>7</code> 元素。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">enum DismissDirection {
  vertical,
  horizontal,
  endToStart,
  startToEnd,
  up,
  down,
  none
}
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><p>如下左图中，设置 <code>startToEnd</code> ,那么从右往左就无法滑动。如下右图中，设置 <code>vertical</code> ,那条目就只能在竖直方向响应滑动。不过和列表同向滑动有个问题，条目响应了竖直拖拽手势，那列表的拖拽手势就会<code>竞技失败</code>，所以列表是滑不动的。一般来说不会让 <code>Dismissible</code> 和列表滑动方向相同，当列表是水平方向滑动， <code>Dismissible</code> 可以使用竖直方向滑动。</p>
<h5 id="4-onresize-和-resizeduration">4. onResize 和 resizeDuration</h5>
<p>在竖直列表中，滑动消失时，下方条目会有一个 <code>上移</code> 的动画。<code>resizeDuration</code> 就代表动画时长，而 <code>onResize</code> 会在动画执行的每帧中进行回调。</p>
<p>源码中可以看出 <code>resizeDuration</code> 的默认时长为 <code>300 ms</code> 。</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ce9d7ded574345aeac6ee9f23bc6aa05~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ce9d7ded574345aeac6ee9f23bc6aa05~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<p>在深入瞄一眼，可以看出会监听动画器执行 <code>_handleResizeProgressChanged</code> 。而 <code>onResize</code> 就是在此触发的。另外这个动画的曲线是 <code>_kResizeTimeCurve</code> 。</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/252a640f3819481288436911f4c44283~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/252a640f3819481288436911f4c44283~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">void</span> _handleResizeProgressChanged() {
  <span style="color:#66d9ef">if</span> (_resizeController<span style="color:#f92672">!</span>.isCompleted) {
    widget.onDismissed<span style="color:#f92672">?</span>.call(_dismissDirection);
  } <span style="color:#66d9ef">else</span> {
    widget.onResize<span style="color:#f92672">?</span>.call();
  }
}

<span style="color:#66d9ef">const</span> Curve _kResizeTimeCurve <span style="color:#f92672">=</span> Interval(<span style="color:#ae81ff">0.4</span>, <span style="color:#ae81ff">1.0</span>, curve: Curves.ease);
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><hr>
<h5 id="5dismissthresholds-和-movementduration">5.dismissThresholds 和 movementDuration</h5>
<p><code>dismissThresholds</code> 表示消失的阈值，类型为<code>Map&lt;DismissDirection, double&gt;</code> 映射，也就是说我们可以设置不同滑动方向的容忍度， 默认是 <code>0.4</code> 。而 <code>movementDuration</code> 代表滑动方向上移动的动画时长。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">const</span> <span style="color:#66d9ef">double</span> _kDismissThreshold <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.4</span>;

<span style="color:#66d9ef">final</span> Map<span style="color:#f92672">&lt;</span>DismissDirection, <span style="color:#66d9ef">double</span><span style="color:#f92672">&gt;</span> dismissThresholds;
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><table>
<thead>
<tr>
<th>默认效果</th>
<th>本案例效果</th>
</tr>
</thead>
<tbody>
<tr>
<td>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f6dcd7ade68d48918c8838b4877a4af0~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f6dcd7ade68d48918c8838b4877a4af0~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </td>
<td>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/163cdf27233a484ab9ead86266e075ae~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/163cdf27233a484ab9ead86266e075ae~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </td>
</tr>
</tbody>
</table>
<p>下面代码的效果如上图右侧，当 <code>startToEnd</code> 的宇宙设置为 <code>0.8</code> , 就会比默认的 <code>难触发移除事件</code> 。其中 <code>movementDuration</code> 设置为 <code>3 s</code> 可以很明显地看出，水平移动的慢速。</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">Widget _buildItems(BuildContext context, <span style="color:#66d9ef">int</span> index) {
  <span style="color:#66d9ef">return</span> Dismissible(
    key: ValueKey(data[index]),
    background: buildBackground(),
    secondaryBackground: buildSecondaryBackground(),
    onResize: _onResize,
    resizeDuration: <span style="color:#66d9ef">const</span> Duration(seconds: <span style="color:#ae81ff">2</span>),
    dismissThresholds: {
      DismissDirection.startToEnd: <span style="color:#ae81ff">0.8</span>,
      DismissDirection.endToStart: <span style="color:#ae81ff">0.2</span>,
    },
    movementDuration: <span style="color:#66d9ef">const</span> Duration(seconds: <span style="color:#ae81ff">3</span>),
    child: ItemBox(
      info: data[index],
    ),
    direction: DismissDirection.horizontal,
    onDismissed: (direction) <span style="color:#f92672">=&gt;</span> _onDismissed(direction, index),
    confirmDismiss: _confirmDismiss,
  );
}
<span style="color:#960050;background-color:#1e0010">复制代码</span>
</code></pre></div><hr>
<h5 id="6-crossaxisendoffset-交叉轴偏移">6. crossAxisEndOffset 交叉轴偏移</h5>
<p>如下图，是 <code>crossAxisEndOffset</code> 为 <code>-2</code> 的效果，在滑动过程中，原条目在交叉轴(此处为纵轴)会发生偏移，偏移量就是 <code>crossAxisEndOffset * 组件高</code> 。右图所示，滑动到一般时， <code>条目 4</code> 已经上移了一个条目高度。</p>
<table>
<thead>
<tr>
<th>1</th>
<th>2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/64b77e8e0d5a4b1c9616a86cbffc71b5~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/64b77e8e0d5a4b1c9616a86cbffc71b5~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </td>
<td>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5f145df304804738a35afbac9925bc31~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5f145df304804738a35afbac9925bc31~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </td>
</tr>
</tbody>
</table>
<p>最后 <code>dragStartBehavior</code> 和 <code>behavior</code> 就不说了，这种通用的属性大家应该非常清楚。</p>
<hr>
<h4 id="三从-dismissible-源码中可以学到什么">三、从 Dismissible 源码中可以学到什么</h4>
<p><code>Dismissible</code> 组件中的 <code>confirmDismiss</code> 和 <code>onDismissed</code> 两个回调打的一个<code>组合拳</code>，还是非常巧妙的，在实际开发中我们也可以通过<code>异步回调</code>来处理一些界面效果。我们来看一下源码中的实现： <code>confirmDismiss</code> 回调在 <code>_confirmStartResizeAnimation</code> 方法中进行调用，</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4467f8e447b14115a2aeb89c15e2123f~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4467f8e447b14115a2aeb89c15e2123f~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<p>在拖拽结束，会先等待 <code>_confirmStartResizeAnimation</code> 的执行，且返回 <code>true</code> ，才会执行 <code>_startResizeAnimation</code> 。</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d6a31c8dd519442eb0db237246556ad1~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d6a31c8dd519442eb0db237246556ad1~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<p>另外一处是在 <code>_moveController</code> 动画器执行完毕，如果动画完成，也会执行类似逻辑。</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/32c0808a27b8462d83f07d134f922122~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/32c0808a27b8462d83f07d134f922122~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<p>最后 <code>onDismissed</code> 回调会在 <code>_startResizeAnimation</code> 中触发。这也就是如何通过一个异步方法，来控制另一个回调的触发。</p>
<p>
        <a data-fancybox="gallery" href="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/16144b20e12147fb8510a1aabdbb11e7~tplv-k3u1fbpfcp-watermark.awebp">
            <img class="mx-auto" alt="img" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/16144b20e12147fb8510a1aabdbb11e7~tplv-k3u1fbpfcp-watermark.awebp" />
        </a>
    </p>
<hr>
<p><code>Dismissible 组件</code>的使用方式到这里就完全介绍完毕，那本文到这里就结束了，谢谢观看，明天见~</p>
<p>作者：张风捷特烈
链接：https://juejin.cn/post/6991639119684173854
来源：掘金
著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。</p>

        </div>

        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://luckly.work/">luckly</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://luckly.work/post/Flutter/flutter%E7%BB%84%E4%BB%B6dismissible/">https://luckly.work/post/Flutter/flutter%E7%BB%84%E4%BB%B6dismissible/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/Flutter/%E4%BD%BF%E7%94%A8flutter%E5%88%9B%E5%BB%BA%E6%B8%85%E5%8D%95/">使用flutter创建清单</a></li>
        
        <li><a href="/post/Flutter/%E4%BD%BF%E7%94%A8flutter%E5%88%9B%E5%BB%BA%E5%B8%A6%E6%9C%89%E5%8A%A8%E7%94%BB%E7%9A%84%E5%88%9B%E6%84%8F%E6%B8%85%E5%8D%95/">使用flutter创建带有动画的创意清单</a></li>
        
        <li><a href="/post/Flutter/%E4%BD%BF%E7%94%A8flutter%E5%88%9B%E5%BB%BA%E6%90%9C%E7%B4%A2%E6%A0%8F/">使用flutter创建搜索栏</a></li>
        
        <li><a href="/post/Flutter/%E4%BD%BF%E7%94%A8flutter%E5%88%9B%E5%BB%BA%E5%93%8D%E5%BA%94%E5%BC%8F%E4%B8%8B%E6%8B%89%E5%AF%BC%E8%88%AA%E6%A0%8F/">使用flutter创建响应式下拉导航栏</a></li>
        
        <li><a href="/post/Flutter/Flutter%E8%87%AA%E5%AE%9A%E4%B9%89%E5%BC%B9%E5%87%BA%E5%8A%A8%E7%94%BB/">Flutter自定义弹出动画</a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            <ul class="clearfix">
                
                <li><a href='/tags/flutter'>flutter</a></li>
                
            </ul>
            
        </div>
    </article>
    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "https://github.com/ITmxs/repo"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2021 <a href="https://luckly.work/">早起的年轻人 By luckly</a>
        
        | <a rel="nofollow" target="_blank" href="http://beian.miit.gov.cn/">粤ICP备2021号-1</a>
        
    </div>
    <br />
    <div>
        <div class="github-badge">
            <a href="https://juejin.cn/user/3843548384077192" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">掘金</span></a>
        </div>
        <div class="github-badge">
            <a href="https://space.bilibili.com/480883651" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">早起的年轻人</span></a>
        </div>
        <div class="github-badge">
            <a href="https://cloud.tencent.com/developer/user/6702670" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">云社区</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>
    <script src="/js/copy-to-clipboard.js"></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://luckly.work/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://luckly.work/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://luckly.work/post/flutter_utils/%E4%BD%BF%E7%94%A8fluttertoast/" title="使用fluttertoast">使用fluttertoast</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/Flutter/flutter%E5%BA%95%E9%83%A8%E5%AF%BC%E8%88%AA%E6%A0%8F/" title="Flutter底部导航栏、">Flutter底部导航栏、</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_package/sliding_up_panel/" title="Sliding_up_panel">Sliding_up_panel</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/Flutter/flutter%E7%BB%84%E4%BB%B6text/" title="Flutter组件text">Flutter组件text</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/%E4%BF%A1%E6%81%AF/%E5%8D%81%E5%A4%A7%E7%AE%A1%E7%90%86%E5%9B%9B%E5%8D%81%E4%B8%83%E8%BF%87%E7%A8%8B/" title="十大管理四十七过程">十大管理四十七过程</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_utils/flutter%E5%B0%86-unix-%E6%97%B6%E9%97%B4%E6%88%B3%E8%BD%AC%E6%8D%A2%E4%B8%BA%E7%89%B9%E5%AE%9A%E6%97%B6%E9%97%B4%E6%96%87%E6%9C%AC%E5%A6%82%E5%B9%B4%E6%9C%88%E6%97%A5/" title="flutter将 unix 时间戳转换为特定时间文本，如年月日">flutter将 unix 时间戳转换为特定时间文本，如年月日</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_package/flutter%E5%BC%80%E5%8F%91tips1/" title="flutter开发tips1">flutter开发tips1</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_package/flutter%E5%BC%80%E5%8F%91tips2/" title="flutter开发tips2">flutter开发tips2</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_package/flutter%E5%BC%80%E5%8F%91tips3/" title="flutter开发tips3">flutter开发tips3</a>
    </li>
    
    <li>
        <a href="https://luckly.work/post/flutter_package/flutter%E5%BC%80%E5%8F%91tips4/" title="flutter开发tips4">flutter开发tips4</a>
    </li>
    
</ul>
    </section>

    
<section class="widget">
    <h3 class="widget-title" style="color:red">福利派送</h3>
    <ul class="widget-list">
        
        <li>
            <a href="https://blog.csdn.net/qq_39132095?spm=1001.2101.3001.5343" title="我的CSDN" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://space.bilibili.com/480883651" title="我的哔哩哔哩" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://www.zhihu.com/people/yimi-yang-guang-96-65" title="我的知乎" target="_blank" style="color:red">
                
                    <img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/flutter.png">
                
            </a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://luckly.work/categories/Go/">Go (1)</a></li>
    
    <li><a href="https://luckly.work/categories/IT/">IT (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Mysql/">Mysql (1)</a></li>
    
    <li><a href="https://luckly.work/categories/Nginx/">Nginx (1)</a></li>
    
    <li><a href="https://luckly.work/categories/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/android/">android (6)</a></li>
    
    <li><a href="https://luckly.work/categories/dart/">dart (8)</a></li>
    
    <li><a href="https://luckly.work/categories/Flutter/">Flutter (174)</a></li>
    
    <li><a href="https://luckly.work/categories/git/">git (3)</a></li>
    
    <li><a href="https://luckly.work/categories/Go/">Go (4)</a></li>
    
    <li><a href="https://luckly.work/categories/ios/">ios (1)</a></li>
    
    <li><a href="https://luckly.work/categories/linux/">linux (1)</a></li>
    
    <li><a href="https://luckly.work/categories/read/">读书笔记 (6)</a></li>
    
    <li><a href="https://luckly.work/categories/redis/">redis (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E5%8D%95/">书单 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%B9%A6%E8%AF%84/">书评 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师 (8)</a></li>
    
    <li><a href="https://luckly.work/categories/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师 (17)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E5%88%99/">原则 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%9F%BA%E7%A1%80/">基础 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E5%BF%83%E8%AF%AD/">心语 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%8F%92%E4%BB%B6/">插件 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E6%95%99%E5%AD%A6/">教学 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%B2%BE%E8%BF%9B/">精进 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E7%BC%96%E7%A8%8B/">编程 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路 (2)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%91%E6%AD%A5/">跑步 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%B7%AF%E7%BA%BF/">路线 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学 (3)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%A1%B9%E7%9B%AE/">项目 (1)</a></li>
    
    <li><a href="https://luckly.work/categories/%E9%AD%85%E5%8A%9B/">魅力 (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/IT/">IT</a>
    
    <a href="https://luckly.work/tags/Mysql/">Mysql</a>
    
    <a href="https://luckly.work/tags/Nginx/">Nginx</a>
    
    <a href="https://luckly.work/tags/YouTube%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD/">YouTube视频下载</a>
    
    <a href="https://luckly.work/tags/android/">android</a>
    
    <a href="https://luckly.work/tags/dart/">dart</a>
    
    <a href="https://luckly.work/tags/flutter/">flutter</a>
    
    <a href="https://luckly.work/tags/git/">git</a>
    
    <a href="https://luckly.work/tags/go/">go</a>
    
    <a href="https://luckly.work/tags/ios/">ios</a>
    
    <a href="https://luckly.work/tags/linux/">linux</a>
    
    <a href="https://luckly.work/tags/redis/">redis</a>
    
    <a href="https://luckly.work/tags/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99/">个人资料</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E5%8D%95/">书单</a>
    
    <a href="https://luckly.work/tags/%E4%B9%A6%E8%AF%84/">书评</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统管理师</a>
    
    <a href="https://luckly.work/tags/%E4%BF%A1%E6%81%AF%E7%B3%BB%E7%BB%9F%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88/">信息系统项目管理师</a>
    
    <a href="https://luckly.work/tags/%E5%85%A5%E9%97%A8/">入门</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E5%88%99/">原则</a>
    
    <a href="https://luckly.work/tags/%E5%8E%9F%E7%94%9F%E9%80%9A%E8%AE%AF/">原生通讯</a>
    
    <a href="https://luckly.work/tags/%E5%9F%BA%E7%A1%80/">基础</a>
    
    <a href="https://luckly.work/tags/%E5%A4%8D%E5%88%A9%E6%95%88%E5%BA%94/">复利效应</a>
    
    <a href="https://luckly.work/tags/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">安装教程</a>
    
    <a href="https://luckly.work/tags/%E5%B0%91%E6%9C%89%E4%BA%BA%E8%B5%B0%E7%9A%84%E8%B7%AF/">少有人走的路</a>
    
    <a href="https://luckly.work/tags/%E5%BF%83%E8%AF%AD/">心语</a>
    
    <a href="https://luckly.work/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="https://luckly.work/tags/%E6%95%99%E5%AD%A6/">教学</a>
    
    <a href="https://luckly.work/tags/%E7%8E%8B%E9%98%B3%E6%98%8E/">王阳明</a>
    
    <a href="https://luckly.work/tags/%E7%94%B5%E5%AD%90%E4%B9%A6/">电子书</a>
    
    <a href="https://luckly.work/tags/%E7%99%BB%E9%99%86%E8%A1%A8%E5%8D%95/">登陆表单</a>
    
    <a href="https://luckly.work/tags/%E7%A8%BB%E7%9B%9B%E5%92%8C%E5%A4%AB/">稻盛和夫</a>
    
    <a href="https://luckly.work/tags/%E7%A9%B7%E7%88%B8%E7%88%B8%E5%AF%8C%E7%88%B8%E7%88%B8/">穷爸爸富爸爸</a>
    
    <a href="https://luckly.work/tags/%E7%B2%BE%E8%BF%9B/">精进</a>
    
    <a href="https://luckly.work/tags/%E7%BC%96%E7%A8%8B/">编程</a>
    
    <a href="https://luckly.work/tags/%E8%AF%97/">诗</a>
    
    <a href="https://luckly.work/tags/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
    
    <a href="https://luckly.work/tags/%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B9%8B%E8%B7%AF/">财务自由之路</a>
    
    <a href="https://luckly.work/tags/%E8%B7%91%E6%AD%A5/">跑步</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82/">路由传参</a>
    
    <a href="https://luckly.work/tags/%E8%B7%AF%E7%BA%BF/">路线</a>
    
    <a href="https://luckly.work/tags/%E8%BD%AF%E4%BB%B6%E5%AE%9E%E6%96%BD/">软件实施</a>
    
    <a href="https://luckly.work/tags/%E9%80%9A%E8%AE%AF%E5%BD%95/">通讯录</a>
    
    <a href="https://luckly.work/tags/%E9%98%B3%E6%98%8E%E5%BF%83%E5%AD%A6/">阳明心学</a>
    
    <a href="https://luckly.work/tags/%E9%A1%B9%E7%9B%AE/">项目</a>
    
    <a href="https://luckly.work/tags/%E9%AD%85%E5%8A%9B/">魅力</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://www.liwenzhou.com/" title="李文周">李文周的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://www.xbzweb.com/" title="小包子的博客">小包子的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="https://www.flysnow.org/" title="飞雪无情的博客">飞雪无情的博客</a>
        </li>
        
        <li>
            <a target="_blank" href="http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e" title="Android Gradle权威指南">Android Gradle权威指南</a>
        </li>
        
        <li>
            <a target="_blank" href="https://gesdh.cn/" title="小格子">格子导航</a>
        </li>
        
        <li>
            <a target="_blank" href="https://itachi.xyz/" title="阿林">itachi&#39;s Blog</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://luckly.work/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>